<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>渐变</title>
    <style>
      div {
        width: 300px;
        height: 300px;

        /* 线性渐变*/
        /* 默认方向是从上到下 */
        /* background: linear-gradient(pink, skyblue); */

        /* 调节渐变的方向 */
        /* background: linear-gradient(to right, pink, skyblue); */
        /* background: linear-gradient(to right bottom, pink, skyblue); */
        /* background: linear-gradient(70deg, pink, skyblue); */

        /* 调节渐变的颜色层级 */
        background: linear-gradient(70deg, pink, skyblue, yellow, green);

        /* 调节渐变的颜色层级梯度的百分比 */
        /* background: linear-gradient(70deg, pink 10%, red 10%, skyblue 5%, green 75%); */

        /* 径向渐变 */
        /* background: radial-gradient(pink, skyblue); */
      }
    </style>
  </head>
  <body>
    <div></div>
  </body>
</html>
